<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Hais丶定制 - 定制详情</title>
    <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
          rel="stylesheet">
    <link href="css/sb-admin-2.min.css" rel="stylesheet">
</head>

<body id="page-top">

<div id="wrapper">
    <div id="content-wrapper" class="d-flex flex-column">

        <!-- Main Content -->
        <div id="content">
            <!-- Page Heading -->
            <h1 class="h5 mb-2 text-gray-800" id="username">进度</h1>
            <p class="mb-4" id="message">未开始</p>

            <div class="card shadow mb-4">
                <div class="card-header py-3">
                    <h6 class="m-0 font-weight-bold text-primary">定制选项</h6>
                </div>
                <div class="card-body">
                    <form class="needs-validation was-validated" action="post" id="makeForm">
                        <div class="form-row">
                            <div class="col-md-3 mb-3">
                                <label for="authorName">定制作者名</label>
                                <input type="text" class="form-control" id="authorName" name="authorName" placeholder="关于界面要展示的作者名字" value="Hais丶纯净版" disabled>
                            </div>
                            <div class="col-md-3 mb-3 form-group">
                                <label for="zipLevel">压缩等级(越大速度越慢)</label>
                                <select class="form-control" id="zipLevel" name="zipLevel" value="3" disabled>
                                    <option value="5">默认5</option>
                                    <option>2</option>
                                    <option>4</option>
                                    <option>6</option>
                                    <option>8</option>
                                    <option>9</option>
                                </select>
                            </div>
                            <div class="col-md-3 mb-3 form-group">
                                <label for="weightNum">插队制作(越多排队越优先)</label>
                                <select class="form-control" id="weightNum" name="weightNum" disabled>
                                    <option value="0">不插队</option>
                                    <option>2</option>
                                    <option>4</option>
                                    <option>6</option>
                                    <option>8</option>
                                    <option>10</option>
                                </select>
                            </div>
                            <div class="col-md-3 mb-3 form-group">
                                <label for="diskType">上传网盘</label>
                                <select class="form-control" id="diskType" name="diskType" disabled>
                                    <option value="user">传自己阿里云(稳定)</option>
                                    <option value="hais">传Hais盘(已失效)</option>
                                    <option value="eu">国外盘(解压后使用)</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-row">
                            <div class="col-md-6 mb-3">
                                <label for="romUrl">MIUI下载地址</label>
                                <input type="text" class="form-control" id="romUrl" name="romUrl" placeholder="请填直链 http://xx.xx.com/miui_xxx.zip" disabled>
                                <div class="invalid-feedback">请填写正确的直链,提取教程可看群共享</div>
                            </div>
                            <div class="col-md-6 mb-3">
                                <label for="diskToken">阿里云Token</label>
                                <input type="text" class="form-control" id="diskToken" name="diskToken" placeholder="保密(如选择Hais盘,请到p.hais.pw寻找下载)" disabled>
                                <div><small>提取请看群公告(传自己网盘时填写)</small></div>
                            </div>
                        </div>
                        <div class="form-row">
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="aiDelete" name="aiDelete" disabled>
                                    <label class="custom-control-label" for="aiDelete">开启强力精简</label>
                                    <div><small>可能会误伤、系统异常、不开机</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isMagisk" name="isMagisk" disabled>
                                    <label class="custom-control-label" for="isMagisk">添加Magisk最新阿尔法版本</label>
                                    <div><small>系统内置Magisk进行ROOT</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isOldApp" name="isOldApp" disabled>
                                    <label class="custom-control-label" for="isOldApp">使用旧版本安装器、文件管理器</label>
                                    <div><small>非MIUI12.5(安卓11)请不要勾选</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isUsb" name="isUsb" disabled>
                                    <label class="custom-control-label" for="isUsb">制作线刷官改包</label>
                                    <div><small>勾选后将生成 .7z 的线刷包</small></div>
                                </div>
                            </div>
                        </div>
                        <div class="form-row">
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isEncryption" name="isEncryption" disabled>
                                    <label class="custom-control-label" for="isEncryption">去除保留强制加密</label>
                                    <div><small>官改一般都是去除的</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isHost" name="isHost" disabled>
                                    <label class="custom-control-label" for="isHost">添加去广告Host</label>
                                    <div><small>可以去广告,可能也会误伤</small></div>
                                </div>
                            </div>
                        </div>
                        <br>
                        <h5>精简选项</h5>
                        <hr/>
                        <div class="form-row">
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelPrint" name="isDelPrint" disabled>
                                    <label class="custom-control-label" for="isDelPrint">去除打印机服务</label>
                                    <div><small>删除打印机功能</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelWallpaper" name="isDelWallpaper" disabled>
                                    <label class="custom-control-label" for="isDelWallpaper">去除系统自带壁纸</label>
                                    <div><small>删除系统自带壁纸和壁纸选择器</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelAudio" name="isDelAudio" disabled>
                                    <label class="custom-control-label" for="isDelAudio">去除铃声提示音</label>
                                    <div><small>去除一些不是默认的提示音</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelIcons" name="isDelIcons" disabled>
                                    <label class="custom-control-label" for="isDelIcons">去除主题完美图标</label>
                                    <div><small>使用第三方主题图标的可去除</small></div>
                                </div>
                            </div>
                        </div>
                        <div class="form-row">
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelNFC" name="isDelNFC" disabled>
                                    <label class="custom-control-label" for="isDelNFC">去除NFC和钱包</label>
                                    <div><small>删除钱包NFC、智能卡等</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelCert" name="isDelCert" disabled>
                                    <label class="custom-control-label" for="isDelCert">去除证书管理</label>
                                    <div><small>删除证书管理、安装等相关</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelTouch" name="isDelTouch" disabled>
                                    <label class="custom-control-label" for="isDelTouch">去除触摸助手</label>
                                    <div><small>去除小圆点触摸助手</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelPortal" name="isDelPortal" disabled>
                                    <label class="custom-control-label" for="isDelPortal">去除传送门</label>
                                    <div><small>需同时保留自带浏览器才正常</small></div>
                                </div>
                            </div>
                        </div>
                        <div class="form-row">
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelCit" name="isDelCit" disabled>
                                    <label class="custom-control-label" for="isDelCit">去除Cit工程模式</label>
                                    <div><small>删除后测试、工程模式将不可用</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelFrequent" name="isDelFrequent" disabled>
                                    <label class="custom-control-label" for="isDelFrequent">去除常用语</label>
                                    <div><small>删除常用语,自带输入法全面屏适配</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelYellowPage" name="isDelYellowPage" disabled>
                                    <label class="custom-control-label" for="isDelYellowPage">去除黄页</label>
                                    <div><small>去除后不可标记和识别来电号码</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelMacro" name="isDelMacro" disabled>
                                    <label class="custom-control-label" for="isDelMacro">去除小米连招</label>
                                    <div><small>一般用不到,我也不知道在哪里</small></div>
                                </div>
                            </div>
                        </div>
                        <div class="form-row">
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelOffAlarm" name="isDelOffAlarm" disabled>
                                    <label class="custom-control-label" for="isDelOffAlarm">去除关机闹钟</label>
                                    <div><small>去除后关机闹钟不会响</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelSearchBox" name="isDelSearchBox" disabled>
                                    <label class="custom-control-label" for="isDelSearchBox">去除上拉搜索框</label>
                                    <div><small>去除后需到桌面设置,设置上滑为无</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelStore" name="isDelStore" disabled>
                                    <label class="custom-control-label" for="isDelStore">去除小米应用商店</label>
                                    <div><small>酷安不好么,为什么要用系统的。</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelBrowser" name="isDelBrowser" disabled>
                                    <label class="custom-control-label" for="isDelBrowser">去除自带浏览器</label>
                                    <div><small>可能影响传送门使用</small></div>
                                </div>
                            </div>
                        </div>
                        <div class="form-row">
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelGoogle" name="isDelGoogle" disabled>
                                    <label class="custom-control-label" for="isDelGoogle">去除Google服务</label>
                                    <div><small>去不去除貌似都要刷模块才能用</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelAssistant" name="isDelAssistant" disabled>
                                    <label class="custom-control-label" for="isDelAssistant">去除桌面负一屏</label>
                                    <div><small>需到桌面设置关闭智能助理</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelXiaoAi" name="isDelXiaoAi" disabled>
                                    <label class="custom-control-label" for="isDelXiaoAi">去除小爱同学</label>
                                    <div><small>感觉挺智障的,唤醒又不灵敏,要他何用</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelMusic" name="isDelMusic" disabled>
                                    <label class="custom-control-label" for="isDelMusic">去除自带小米音乐</label>
                                    <div><small>感觉压抑云好像好一些.</small></div>
                                </div>
                            </div>
                        </div>
                        <div class="form-row">
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelVideo" name="isDelVideo" disabled>
                                    <label class="custom-control-label" for="isDelVideo">去除自带小米视频</label>
                                    <div><small>群共享的EU本地版本好多了.</small></div>
                                </div>
                            </div>
                            <div class="col-md-3 mb-3">
                                <div class="custom-control custom-checkbox">
                                    <input type="checkbox" class="custom-control-input" id="isDelMiPlus" name="isDelMiPlus" disabled>
                                    <label class="custom-control-label" for="isDelMiPlus">去除MIUI+</label>
                                    <div><small>去除MIUI+,多屏互动、互传</small></div>
                                </div>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>
        <footer class="sticky-footer bg-white">
            <div class="container my-auto">
                <div class="copyright text-center my-auto">
                    <span>Copyright © 2020-2021 hais.pw</span>
                </div>
            </div>
        </footer>
    </div>
</div>
<a class="scroll-to-top rounded" href="#page-top">
    <i class="fas fa-angle-up"></i>
</a>

<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>

<!-- Custom scripts for all pages-->
<script src="js/sb-admin-2.min.js"></script>
<script>
    var urlRequest=function(name){
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if(r != null){return decodeURIComponent(r[2]);}else{return null;}
    };

    loadMakeList(urlRequest('id'));
    function loadMakeList(id) {
        $.ajax({
            type: "get",
            data: "random=" + Math.random(),
            url: "http://api.hais.pw/miui/make/get?id="+id,
            dataType: "json",
            beforeSend: function (XMLHttpRequest) {
                XMLHttpRequest.setRequestHeader("Authorization", 'Bearer ' + localStorage.getItem("user_token"));
            },
            success: function (data) {
                console.log(data);
                var details =JSON.parse(data.detail);
                console.log(details);
                $('#username').html(data.userId+"的定制");
                $('#authorName').attr("value",details.authorName);
                $('#zipLevel').attr("value",details.zipLevel);
                $('#weightNum').attr("value",details.weightNum);
                $('#diskType').attr("value",details.diskType);
                $('#romUrl').attr("value",data.romUrl);
                if(details.aiDelete){$('#aiDelete').attr("checked",'');}
                if(details.isMagisk){$('#isMagisk').attr("checked",'');}
                if(details.isOldApp){$('#isOldApp').attr("checked",'');}
                if(details.isUsb){$('#isUsb').attr("checked",'');}
                if(details.isEncryption){$('#isEncryption').attr("checked",'');}
                if(details.isHost){$('#isHost').attr("checked",'');}
                if(details.isDelPrint){$('#isDelPrint').attr("checked",'');}
                if(details.isDelWallpaper){$('#isDelWallpaper').attr("checked",'');}
                if(details.isDelAudio){$('#isDelAudio').attr("checked",'');}
                if(details.isDelIcons){$('#isDelIcons').attr("checked",'');}
                if(details.isDelNFC){$('#isDelNFC').attr("checked",'');}
                if(details.isDelCert){$('#isDelCert').attr("checked",'');}
                if(details.isDelTouch){$('#isDelTouch').attr("checked",'');}
                if(details.isDelPortal){$('#isDelPortal').attr("checked",'');}
                if(details.isDelCit){$('#isDelCit').attr("checked",'');}
                if(details.isDelFrequent){$('#isDelFrequent').attr("checked",'');}
                if(details.isDelYellowPage){$('#isDelYellowPage').attr("checked",'');}
                if(details.isDelMacro){$('#isDelMacro').attr("checked",'');}
                if(details.isDelOffAlarm){$('#isDelOffAlarm').attr("checked",'');}
                if(details.isDelSearchBox){$('#isDelSearchBox').attr("checked",'');}
                if(details.isDelStore){$('#isDelStore').attr("checked",'');}
                if(details.isDelBrowser){$('#isDelBrowser').attr("checked",'');}
                if(details.isDelGoogle){$('#isDelGoogle').attr("checked",'');}
                if(details.isDelAssistant){$('#isDelAssistant').attr("checked",'');}
                if(details.isDelXiaoAi){$('#isDelXiaoAi').attr("checked",'');}
                if(details.isDelMusic){$('#isDelMusic').attr("checked",'');}
                if(details.isDelVideo){$('#isDelVideo').attr("checked",'');}
                if(details.isDelMiPlus){$('#isDelMiPlus').attr("checked",'');}
                $("#message").html(data.message);
            },
            error: function (data) {

            }
        });
    }
</script>

</body>

</html>
